package system

import "seven-admin/app/collection"

type AuthAdmin struct {
	collection.Model
	DeptId        uint        `gorm:"not null;default:0;comment:'部门ID'"`
	PostId        uint        `gorm:"not null;default:0;comment:'岗位ID'"`
	Username      string      `gorm:"not null;default:'';comment:'用户账号''"`
	Nickname      string      `gorm:"not null;default:'';comment:'用户昵称'"`
	Password      string      `gorm:"not null;default:'';comment:'用户密码'"`
	Avatar        string      `gorm:"not null;default:'';comment:'用户头像'"`
	Role          string      `gorm:"not null;default:'';comment:'角色主键'"`
	RoleInfo      *AuthRole   `gorm:"-"`
	Salt          string      `gorm:"not null;default:'';comment:'加密盐巴'"`
	Sort          uint16      `gorm:"not null;default:0;comment:'排序编号'"`
	IsMultipoint  uint8       `gorm:"not null;default:0;comment:'多端登录: 0=否, 1=是''"`
	IsDisable     uint8       `gorm:"not null;default:0;comment:'是否禁用: 0=否, 1=是'"`
	LastLoginIp   string      `gorm:"not null;default:'';comment:'最后登录IP'"`
	LastLoginTime int64       `gorm:"not null;default:0;comment:'最后登录时间'"`
	TenantId      uint        `gorm:"not null;default:0;comment:'创建人'"`
	Tenant        *AuthTenant `gorm:"foreignkey:TenantId;references:ID"`
	collection.SoftDelete
}
